<template>
    <el-dialog
        class="dialog"
        :destroy-on-close="true"
        :title="title"
        :visible.sync="isShow"
        :close-on-click-modal="false"
        @close="onDialogClose"
    >
        <el-form
            ref="form"
            label-width="auto"
            class="form"
            :model="formData"
            :rules="rules"
        >
            <el-form-item label="姓名：" prop="member_xm">
               {{formData.member_xm}}&emsp;({{ formData.phone }})
            </el-form-item>
       
        <el-form-item label="重置密码：" prop="holder_password">
           
           
            <el-input
                v-model="formData.holder_password"
                type="text"
                placeholder="请输入新密码"
                maxlength="20"
                class="input-with-select"
            >
            </el-input>
       
        </el-form-item>
        </el-form>
        <div slot="footer" class="dialog-footer">
            <el-button @click="onDialogClose">取消</el-button>
            <el-button type="primary" @click="onSubmit">确认</el-button>
        </div>
    </el-dialog>
</template>

<script lang="ts">
import { Component, Vue } from "vue-property-decorator";
import { Action } from "vuex-class";
import { mixinDialogForm } from "@/mixin/dialog/Form";
@Component({
    mixins: [mixinDialogForm]
})
export default class parkTenantAppauth extends Vue {
    @Action("parkTenant/auth") itemEdit: any;
    editInit(data: any) {
        const me = this as any;
        me.formData = Object.assign({}, me.formData, data);
    }
    // 表单数据
    formData: any = {
        app_status: "1",
        door_remote_open: '1',
        ladder_remote_open: '1',
        door_vistor_invite: '1',
        holder_password: ''
    };

    /**
     * 校验配置
     *
     * @type {*}
     * @memberof mixinViewRules
     */
    rules: any = {
        app_status: [
            {
                required: true,
                message: "请选择是否开启app授权",
                trigger: "blur"
            }
        ],
        door_remote_open: [
            {
                required: true,
                message: "请选择是否允许远程开门",
                trigger: "blur"
            }
        ],
        ladder_remote_open: [
            {
                required: true,
                message: "请选择是否允许远程呼梯",
                trigger: "blur"
            }
        ],
        door_vistor_invite: [
            {
                required: true,
                message: "请选择是否允许访客邀约",
                trigger: "blur"
            }
        ]
       
    };
    // 标题
    get title() {
        return `重置密码`;
    }
}
</script>

